<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.thymeleaf.org">
<head>
    <!--登录界面-->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>登录</title>

    <!--引入资源文件-->
    <link rel="stylesheet" th:href="@{/static/css/bootstrap.min.css}">
    <link rel="stylesheet" th:href="@{/static/css/bootstrap-theme.min.css}">
    <link rel="stylesheet" th:href="@{/static/css/mycss.css}">

    <script th:src="@{/static/js/jquery.min.js}"></script>
    <script th:src="@{/static/js/bootstrap.min.js}"></script>

    <script>
        function check() {
            if (
                $("#exampleInputEmail1").val() == "" ||
                $("#exampleInputPassword1").val() == ""
            ) {
                var warinngdiv = $("#warinnginfo");
                warinngdiv.html($("  <div class=\"alert alert-danger warringInfo\" role=\"alert\"\n" +
                    "                 >用户名和密码不能为空</div>"));
                return false;
            }
        }
    </script>

</head>
<body class="mybody">
<!--<div th:insert="navigation :: Nav"></div>-->

<div class="login"style="border-radius: 10px" >
    <p class="logintitle">欢迎来到智慧物流园区系统</p>
    <form action="#" th:action="@{/user/login}" method="post" class="loginform"
          onsubmit="return check()">

        <div class="form-group">
            <label for="exampleInputEmail1">账户</label>
            <input type="text" class="form-control" id="exampleInputEmail1" placeholder="account" name="useraccount"
                   th:value="${account}">
        </div>
        <div class="form-group">
            <label for="exampleInputPassword1">密码</label>
            <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password" name="userpwd"
                   th:value="${pwd}">
        </div>

        <button type="submit" class="btn btn-success loginbutton">登录</button>
        <a class="btn btn-primary loginSignin" href="#" role="button"
           th:href="@{/Signup}">注册</a>


        <div id="warinnginfo" class="form-group" style="margin-bottom: 10px">

            <div class="alert alert-danger warringInfo" role="alert"
                 th:text="${errorAccount}" th:if="${not #strings.isEmpty(errorAccount)}"></div>

            <div class="alert alert-danger warringInfo" role="alert"
                 th:text="${errorPassword}" th:if="${not #strings.isEmpty(errorPassword)}"></div>
        </div>
    </form>

    <hr style="margin: 20px 9% 20px;"/>
    <p class="loginend">使用其他账号登录</p>
</div>
</body>
</html>